Embedded Speech Commands

For the more advanced users it is also possible to put embedded speech commands in the input text. Below are a few examples to let every character or digit be spoken character by character but it is also possible to set the input mode to phoneme text and then pass raw phoneme text. These commands are included in the phoneme code returned by the SP Voice code function when you pass one (1) in the flag parameter. The returned string then starts with a command to set the input mode to phoneme and at the end sets it back to normal text mode. Passing the string without these commands (to e.g. SP Voice String) causes the Speech Manager to try to read out the code as normal text.
See the Speech Manager documentation for more information. If you use embedded speech commands with any of the functions to speak text, a number of additional errors (listed below) may occure but they are not listed as ”Possible errors“ in the Speech Pack Language Reference.

Examples:
  `all characters (including digits) in the string in the $line variable
  `are spoken character by character and the setting is restored to 
  `normal speech
  $err := SP Voice String ($speechref;"[[char LTRL]]"+$line+
              "[[char NORM]]")

  `all digits in the string in the $line variable are spoken digit by digit
  `and the setting is restored to normal speech
  $err := SP Voice String ($speechref;"[[nmbr LTRL]]"+$line+
               "[[nmbr NORM]]")

  `but you may want to set the rate a bit slower first!

Embedded Speech Command errors:
  -245  Parameter value is invalid.
  -246  Embedded command syntax or parameter problem.
  -247  Embedded command is not implemented on synthesizer
            (also: Input text bad).
  -248  Raw phoneme text contains invalid characters.
  -250  Specified voice has not been preloaded.
  -252  Incorrect number of embedded command arguments found.